<% form_for(@parent ? [@parent, event] : event) do |f| %>

  <%= f.error_messages %>

  <p>
    <%= f.label :title %><br />
    <%= f.text_field :title %>
  </p>
  <p>
    <%= f.label :start %><br />
    <%= f.datetime_select :start %>
  </p>
  <p>
    <%= f.label :end %><br />
    <%= f.datetime_select :end %>
  </p>
  <p>
    <%= f.label :details %><br />
    <%= f.text_area :details %>
  </p>
  <p>
    <%= f.label :contact %><br />
    <%= f.text_field :contact %>
  </p>
  <p>
    <%= f.label :location_id %><br />
    <%= f.collection_select :location_id, @locations, :id, :title  %>
  </p>
  <p>
    <%= f.submit button_text %>
  </p>
<% end %>

